#ifndef BASEAPPENDER_H
#define BASEAPPENDER_H

#include <QString>
#include <QObject>

#include "log_enums.h"


//基础附着器
class BaseAppender : public QObject
{
    Q_OBJECT
public:
    BaseAppender(QObject* parent = nullptr): QObject(parent), m_level(LogLevel::Debug){};
    BaseAppender(LogLevel level, QObject* parent = nullptr): QObject(parent), m_level(level){};
    virtual void setLevel(LogLevel level){m_level = level;}
    virtual void append(LogLevel level,const QString &msg) = 0;
protected:
    LogLevel m_level = LogLevel::Debug;
};

#endif // BASEAPPENDER_H
